ls=list(input("请输入一行字符串："))
dic={}
for x in ls:
    dic[x]=dic.get(x,0)+1
print("这些字符串出现的次数",dic)
newdic=sorted(dic.items(),key=lambda x:x[1],reverse=True)
print("按值从大到小排序：",newdic)
